Now I want to make a place that we can teleport to, and we're going to set it up as a reserve server.
So once the battle is initiated and the group gets teleported, no one else can enter.
For now, we're just going to teleport ourself.
Let's go to not home, not model view, right the view tab.
And then I have them all mushed together.
But it's this one right here up in the upper left.
If you hover over it says Asset Manager.
Let's go ahead and click on that.
This is our asset manager.
We have something called Places We can right click and it says Add New Place when we click on Add New
Place.
This is the new place that got added.
So it has your name and then just a place number and it's just a base plate.
Let's go ahead and rename it to something like Battle Royale.
Battle Royale.
There we go.
And we can open it by double clicking right here.
That's going to take a minute.
I'll just pause the video while it's opening up.
And here we go.
We have our fresh place.
Now, there's nothing in it.
There's no scripts.
But you do have access to your data store.
From your experience from the original game, this is an extension of that game.
If you go to game settings under security, you'll notice that enable studio access to API services
is already checked on.
That's pretty convenient.
Now let's go ahead and get the ID for this and put it in our game so that we can teleport here.
I'm going to switch back to my other game and there's my original game and we're back.
So I am going to right click on this battle royale.
And then I'm going to copy ID to the clipboard.
That's the ID that gets you to the other place.
The other world.
I'm going to go over to my bottle wall if you don't have it open.
It's under your workspace bottle wall.
Remember we had this string value right here.
I'm going to go to the value on the string value, and I'll just do a paste and I'll hit enter.
There we go.
Now we have the ID that we can tell the teleportation service to get us to our new world.
Let's write the code that's going to teleport us to our new world.
When we press this green button, we're not going to initiate the whole bottle.
We're just going to teleport.
But I'm going to do the private server stuff.
So let's close our asset manager so we have more room.
And then under the battle wall, double click initiate battle.
Let's add a little bit of code.
Go ahead and get rid of your print statement.
We're going to get our clicker from our button, right?
So we'll do the little click detector, We'll do local.
I'm going to call it clicker.
That's why I said clicker where the script dot parent.
That's the battle wall, the model.
And then we're going to go down a level to our button and then we're going to go down one more level
to our click detector.
There it is.
All right.
What else do I need?
I need my place ID, so I'll do a local place ID and we could do script parent again.
I guess I could have made a variable to shorten that a little bit.
Place ID and place ID has a value and that's the ID.
I'm going to get the teleportation service.
I'll just call it TS Teleportation service game.
Get service teleportation servers.
Oh, I always say teleportation service.
It's teleport service, Right, Teleport service.
But I'll make that mistake again.
So just keep reminding yourself.
No teleport service.
He just does that all the time.
All right, What else do I need?
Oh, I'm going to get a player queue.
I might as well initialize it now.
I'm not going to.
I'm going to use it to put myself in it.
Everybody in the queue is going to get teleported, but we're just going to put ourself in the queue
for for now for this lesson.
So let's do player queue and I'll just make that an empty table.
I'm just going to start out with two functions.
We're going to do a function to send the players.
And I'll use that player.
Q to determine who gets sent.
And I'm going to do another function, local function called start registration.
And player is going to get passed in.
That's the player that starts the registration.
And the reason we can get that player really easy is because we have the click detector.
Mouse click.
Connect that to our start registration.
Get rid of those two extra parentheses down here.
The roadblocks always adds, but we'll cause an error.
And when we call start registration from the mouse, click on the click detector.
The player who clicked the mouse is going to get passed in.
Now, we're not going to do a lot of start registration right now because we don't have a UI and things
like that, but we can put our player in the queue and then send them over or send her over.
So I'll do this table insert.
We have our player queue that has the table with all the players do comma player.
So we've got a table with one player.
Now when that's populated, we're just going to do send players.
Whoever is in here is going to get sent.
And since we're going to do a private server or a reserve server, I should say reserved server, we're
going to need a code, right?
So that you need that code to get into the reserve server.
I'm going to use my teleportation service.
Oh, teleport service, teleport service.
And then I'll do reserve server.
Nice.
And now we need our place ID, Right.
So we got place ID Now we've got a code.
For a reserve server where you can get in.
I'm going to do the teleportation service.
Teleport service again.
And we got teleport to a private server, right?
So you can read up on those if you know how to do one.
It's not hard to figure out how to do the other types of other types of teleport service, teleporting,
teleporting to the server.
All right.
So we're going to need the place ID where we're going.
We're going to need the code because it's a private server, and then we're going to need the players
are going to get teleported.
In this case, it's just me.
But we're going to put more in there.
People who accept, they're going to they're all going to be able to go over.
All right.
That's pretty good.
This should work.
Here's the downside.
We can't teleport from Roadblock studio.
We're going to have to play the game.
Oh, you know what?
I'm going to add one more line of code here.
I'm going to say player Q After we do the teleport empty, so we make the table empty.
All right, let's save this off.
Published a row box, and I'm going to go to my website, bring up my roadblocks account, and look
for this game.
All right, I got the website open.
I'm logged in as SIM Tech Nitro one.
We're going to go under create.
And this changes all the time.
So if you can't find it, you'll have to click around.
You might have some blank screen and it'll have like start, create, and underneath it'll say like
manage something or manage creations.
Go ahead and just click that link underneath.
You'll get something similar to this.
This is brand new.
All right, here's my game.
This is the one I was doing.
I made it public because I wanted to test it with my alt.
Let's go ahead and click on this.
And we'll say a view on roadblocks.
Cool.
And then I'm going to hit play, right?
And this is going to start at the roadblocks player.
I'm going to be able to enter my zombie game and then I should be able to teleport to my new place.
Oh, look at that.
It's upgrading.
I'm going to pause the video.
All right, here we go.
That took like 5 minutes to.
I haven't I haven't played roadblocks player in a while.
Oh, you blew your streak.
That's all right.
And we've got Chuck Norris down there kicking away zombies.
Let's go over to our game.
Click to initiate battle, and that's going to take a minute.
Teleportation failed attempt to teleport to this place that is restricted.
Literally 20 minutes later, I found out what our problem was with our teleportation.
I was going to redo that section of the video, but I thought not because you are going to run into
a lot of errors with the teleport service.
It's just kind of riddled with errors and they're changing things all the time.
So it's important to be able to troubleshoot this.
I'm going to go to my other world.
There you go.
I brought that up.
Go to your game settings.
If you'll remember, our original place was public.
If you don't remember, our original place was public.
I'm going to go to permissions.
And our new place is friends.
I don't know why.
Just make out public.
Hit.
Save.
Go to file published roadblocks.
Let's go back to our original world.
Check everything there.
We'll go to game settings on the original world.
Permission public.
That's fine.
And we have code in there too, so let's go ahead and publish this.
You have to publish everything if you're going to use the player.
And I don't think I did that.
And you have to make sure that the permissions match, too.
Now, let's go to our website.
Here's our creator dashboard.
And we selected the game already.
This is up from the last video I'm going to view on roadblocks.
And I'm going to hit the play button.
And I pause this so that you don't have to wait for it to come up.
So now I'm in my world and this is the player.
This is not Roadblock studio, but I still want to see the developer console.
So notice my mouse.
I'm going to go to this box in the upper left corner, the little roadblock symbol.
Let's click on that.
Open it up and then I'm going to go to settings.
In settings, I'm going to scroll down to the bottom where it says Developer console I'm going to hit
open.
Cool.
And this is the client side.
See that blue button?
I'm going to go to server side, click on that and I can see the messages coming out the server side.
I want to move this a little bit, so I'm going to go up to this bar at the top.
You have you're paying value and your memory usage drag.
This will make it a little smaller.
So I'm down here at the bottom, there's a little black box in the bottom.
We can make that a little smaller.
All right.
Now, we don't have any printouts we could other than the health, but for our teleportation.
Let's see what happens when we click this green button.
And it's going to take a minute, but that's all right.
We'll have a UI in place eventually.
And here's our Battle Royale.
That's pretty cool.
So we teleported to a new place.
We should have put, like, a tree in it or something, so we'd know we were there.
But you get the idea.
Now what we need to do is get a whole group to teleport over.
And we also need to have the UI people can join, people can get out, things like that.
And our weapons, we've got to bring our weapons over and we've got to bring our points over.
So that's all pretty cool stuff.
Let's go ahead and get started with that in the next video.